package com.bbh.plugin.single.privilege.core.service;


import com.bbh.plugin.single.privilege.core.repository.AreaMapper;
import com.bbh.plugin.single.privilege.core.vo.tree.AreaVo;
import com.bbh.plugin.single.privilege.core.vo.tree.ZTreeNoneAjaxVo;
import com.bbh.plugin.single.privilege.core.entity.Area;
import org.springframework.beans.factory.annotation.Autowired;
import com.bbh.common.domain.Page;


import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;
import com.bbh.common.base.service.BaseService;
/**
 * Created by roman_000 on 2015/7/15.
 */
@Service
@Transactional
public class AreaService extends BaseService<Area,String>{
    @Autowired
    private AreaMapper areaMapper;
    /*
       * 分页查询
       *
       * */
       public List<AreaVo> findList(Map<String, Object> params, Page pageable){
        List<AreaVo> list=areaMapper.findList(params);

        return list;
    }

    /*
   * ztree查询
   *
   * */
    public List<ZTreeNoneAjaxVo> selectTreeArea(Map<String, Object> params){
        List<ZTreeNoneAjaxVo> list=areaMapper.selectTreeArea(params);
        return list;
    }


}
